package h_eekwan.basic;

public class Q75_Stock {
	public static void main(String[] args) {
		
		Stock Joo = new Stock("KMW",  15000, 17700);
		Joo.getSname();
		Joo.getPreviousClosingPrice()
		;
		Joo.getCurrentPrice();
		System.out.println(Joo.toString());		
	}
}
class Stock{
	private String sname;
	private int previousClosingPrice;
	private int currentPrice;
	
	public Stock(String sname, int previousClosingPrice, int currentPricce ){
		this.sname = sname;
		this.currentPrice = currentPricce;
		this.previousClosingPrice = previousClosingPrice;
		
	}

	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public int getPreviousClosingPrice() {
		return previousClosingPrice;
	}

	public void setPreviousClosingPrice(int previousClosingPrice) {
		this.previousClosingPrice = previousClosingPrice;
	}

	public int getCurrentPrice() {
		return currentPrice;
	}

	public void setCurrentPrice(int currentPrice) {
		this.currentPrice = currentPrice;
	}

	@Override
	public String toString() {
		String result;
		result = " Stock name =" + sname;
		result += " 어제의 종가 =" + previousClosingPrice;
		result += " 현재가 = " + currentPrice;
		return result.toString();
	}
 
	
}